package o;

import android.app.Activity;
import android.content.Context;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;
import com.huawei.hmf.annotation.ApiDefine;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import o.bcg.h;

@ApiDefine(uri = bcf.class)
public class bdp implements bcf {
    public void ˊ(Context context, String str, String str2, String str3, String str4, IServerCallBack iServerCallBack) {
        cvt o_bcs = new bcs();
        o_bcs.ˋ(ॱ(str));
        o_bcs.ˏ(ॱ(str2));
        o_bcs.setServiceType_(cdh.ˎ((Activity) context));
        o_bcs.ˊ(String.format(context.getString(h.ˑॱ), new Object[]{str3, str4}));
        cfw.ˎ(o_bcs, iServerCallBack);
    }

    private String ॱ(String str) {
        if (dof.ॱ(str)) {
            bcb.ˋ.ˏ("CommentReplyImpl", "id = null");
            return str;
        } else if (!str.contains("app_detail_comment") && !str.contains("app_detail_reply")) {
            bcb.ˋ.ˏ("CommentReplyImpl", "id not contains comment or reply");
            return str;
        } else if (str.contains(HiAnalyticsConstant.REPORT_VAL_SEPARATOR)) {
            return str.substring(str.lastIndexOf(HiAnalyticsConstant.REPORT_VAL_SEPARATOR) + 1);
        } else {
            bcb.ˋ.ˏ("CommentReplyImpl", "id not contains |");
            return str;
        }
    }
}
